﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;

namespace Server_NhaSach.DataTransferObject
{
    public class MatHangDTO
    {

        #region "Khai báo các biến"
        private string _maMH;
        private string _maloai;
        private string _tenMH;
        private double _dongianhap;
        private double _dongiasi;
        private double _dongiale;
        private float _khuyenmai;
        private string _nhasx;
        private string _tacgia;
        private string _namsanxuat;
        private string _dausach;
        private string _dvt;
        private int _soluongtondauky;
        private int _soluonghienco;        
        private byte[] _hinh;
        #endregion

        #region "Khai báo các thuộc tính"
        [DataMember]
        public string MaMH
        {
            get { return _maMH; }
            set { _maMH = value; }
        }
        [DataMember]
        public string Maloai
        {
            get { return _maloai; }
            set { _maloai = value; }
        }
        [DataMember]
        public string TenMH
        {
            get { return _tenMH; }
            set { _tenMH = value; }
        }
        [DataMember]
        public double Dongianhap
        {
            get { return _dongianhap; }
            set { _dongianhap = value; }
        }
        [DataMember]
        public double Dongiasi
        {
            get { return _dongiasi; }
            set { _dongiasi = value; }
        }
        [DataMember]
        public double Dongiale
        {
            get { return _dongiale; }
            set { _dongiale = value; }
        }
        [DataMember]
        public float Khuyenmai
        {
            get { return _khuyenmai; }
            set { _khuyenmai = value; }
        }
        [DataMember]
        public string Nhasx
        {
            get { return _nhasx; }
            set { _nhasx = value; }
        }
        [DataMember]
        public string Tacgia
        {
            get { return _tacgia; }
            set { _tacgia = value; }
        }
        [DataMember]
        public string Namsanxuat
        {
            get { return _namsanxuat; }
            set { _namsanxuat = value; }
        }
        [DataMember]
        public string Dausach
        {
            get { return _dausach; }
            set { _dausach = value; }
        }
        [DataMember]
        public string Dvt
        {
            get { return _dvt; }
            set { _dvt = value; }
        }
        [DataMember]
        public int Soluongtondauky
        {
            get { return _soluongtondauky; }
            set { _soluongtondauky = value; }
        }
        [DataMember]
        public int Soluonghienco
        {
            get { return _soluonghienco; }
            set { _soluonghienco = value; }
        }
        [DataMember]
        public byte[] Hinh
        {
            get { return _hinh; }
            set { _hinh = value; }
        }
        #endregion
     
        #region "Khai báo các contructor"
        //khong doi so
        public MatHangDTO() { }
        public MatHangDTO(string mamh, string maloai, string tenmh, double dgn, double dgs, double dgl, float km, string nhasx, string tg, string namsx, string dausach, string dvt, int sldauky, int slhienco, byte[] hinh)
        {
            MaMH = mamh;
            Maloai = maloai;
            TenMH = tenmh;
            Dongianhap = dgn;
            Dongiasi = dgs;
            Dongiale = dgl;
            Khuyenmai = km;
            Nhasx = nhasx;
            Tacgia = tg;
            Namsanxuat = namsx;
            Dausach = dausach;
            Dvt = dvt;
            Soluongtondauky = sldauky;
            Soluonghienco = slhienco;
            Hinh = hinh;
         
        }
        public MatHangDTO(MatHangDTO MatHang)
        {
            this.MaMH = MatHang.MaMH;
            this.Maloai = MatHang.Maloai;
            this.TenMH = MatHang.TenMH;
            this.Dongianhap = MatHang.Dongianhap;
            this.Dongiasi = MatHang.Dongiasi;
            this.Dongiale = MatHang.Dongiale;
            this.Khuyenmai = MatHang.Khuyenmai;
            this.Nhasx = MatHang.Nhasx;
            this.Tacgia = MatHang.Tacgia;
            this.Namsanxuat = MatHang.Namsanxuat;
            this.Dausach = MatHang.Dausach;
            this.Dvt = MatHang.Dvt;
            this.Soluongtondauky = MatHang.Soluongtondauky;
            this.Soluonghienco = MatHang.Soluonghienco;
            this.Hinh = MatHang.Hinh;    
        }
        #endregion
    }
}